package com.yao.web;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.yao.dao.UserMapper;
import com.yao.domain.User;
 

@RestController
@Transactional
@RequestMapping(value="/user")
public class UserController {
	   //@Autowired
	   //private UserMapper userMapper;
		

	   @RequestMapping("/insert")	
	   public int insert(String name, Integer age){
		  int result =0; 
//	      if (!name.trim().equals(""))
//	    	  result = userMapper.insert(name, age);
	      return result;
	   }
 

	    @RequestMapping("/findByName")	   
	   public User findByName(String name){
	    	return null;
		  //return  userMapper.findByName(name);
	   }


	   public void delete(long id){
		   //userMapper.delete(id);
		   
	   }
 
}
